<template>
  <div class="left-container">
    <h3>Left 组件</h3>
    <hr>
    <p>count的值： {{ count }}</p>
    <button @click="add">count值+1</button>
  </div>
</template>

<script>
export default {
  name: 'MyLeft',
  created() {
    console.log('Left组件被创建');
  },
  activated() {
    console.log('Left组件被激活');
  },
  deactivated() {
    console.log('Left组价被缓存');
  },
  data() {
    return {
      count: 0
    }
  },

  methods: {
    add() {
      this.count += 1
    }
  }
}
</script>

<style lang="less">
.left-container {
  padding: 0 20px 20px;
  background-color: orange;
  min-height: 250px;
  flex: 1;
}
</style>
